package cn.itsource.pethome.system.dept.domain;

import cn.itsource.pethome.system.employee.domain.Employee;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author:R
 * @Date:2022/12/28 16:17
 * Description
 */
@Data
public class Department {
    private Long id;
    private String sn;
    private String name;
    private String dirPath;
    private Integer state;
    private Long manager_id;
    private Long parent_id;
    private Long shop_id;

    //填充管理员和上级部门，两表联查
    private Employee manager;
    private Department parent;

    //放子级部门
    //去掉转json时为空的集合
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Department> children = new ArrayList<>();
}
